<%--
  Created by IntelliJ IDEA.
  User: Tong-dev
  Date: 2015-12-25
  Time: 18:05
--%>

<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <title>CoreMail SSO</title>
</head>

<body>
<asset:javascript src="dingtalk.js"/>
<script type="text/javascript">
    dd.ready(function () {
        <dd:config agentId="13305008" nonceStr="abcdefg"
               jsApiList="['device.notification.alert','runtime.info','runtime.permission.requestAuthCode']"/>


        dd.runtime.permission.requestAuthCode({
            corpId: "${corpid}",
            onSuccess: function(result) {
               window.location.href = "${createLink(action: 'sso')}?code="+result.code
            },
            onFail : function(err) {}

        })


    });


</script>
</body>

</html>